package com.zmm.member.dao;

import com.zmm.member.model.Customer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author 900045
 * @description:
 * @name CustomerDao
 * @date By 2021-07-26 11:03:37
 */
@Mapper
public interface CustomerDao {

	/**
	 * 新增 用户信息-- jdbc
	 * @author: 900045
	 * @date: 2021-07-26 11:04:52
	 * @throws 
	 * @param customer: 
	 * @return: java.lang.Integer
	 **/
	Integer saveCustomer(Customer customer);
	
	/**
	 * 更新 用户信息-- jdbc
	 * @author: 900045
	 * @date: 2021-07-26 11:17:07
	 * @throws 
	 * @param customer: 
	 * @return: java.lang.Integer
	 **/
	Integer updateCustomerByCustomerId(Customer customer);

	/**
	 * 根据 手机号查询 用户信息-- jdbc
	 * @author: 900045
	 * @date: 2021-07-26 15:12:27
	 * @throws 
	 * @param phone: 
	 * @return: com.zmm.member.model.Customer
	 **/
	Customer selectOneCustomerByPhone(@Param("phone") String phone);

	/**
	 * 登录成功后 更新 一些信息
	 * @author: 900045
	 * @date: 2021-08-06 17:24:10
	 * @throws 
	 * @param customerId: 
	 * @param ip: 
	 * @param loginTime: 
	 * @return: void
	 **/
	void updateLoginInfo(@Param("customerId") Integer customerId, @Param("ip") String ip, @Param("loginTime") Long loginTime);
	
}
